import request from '@/utils/requestExam'

//查询试卷列表
export function getExamPaperList(query){
  return request({
    url: "/api/uf/boostor/exam/question/ExamPaperRest/searchByPage/v1",
    method: "post",
    data: query
  })
}

//通过试卷id查询试卷信息
export function getExamPaperByPaperId(paperId){
  return request({
    url: "/api/uf/boostor/exam/question/ExamPaperRest/paperId/" + paperId,
    method: "get"
  })
}

//通过题库Id查询试卷信息（已启用试卷）
export function getPaperListByQuestionBankId(questionBankId){
  return request({
    url: "/api/uf/boostor/exam/question/ExamPaperRest/questionBankId/" + questionBankId,
    method: "get"
  })
}


//新增
export function addExamPaper(data){
  return request({
    url: "/api/uf/boostor/exam/question/ExamPaperRest/add/v1",
    method: "post",
    data: data
  })
}

//修改
export function updateExamPaper(data){
  return request({
    url: "/api/uf/boostor/exam/question/ExamPaperRest/edit/v1",
    method: "put",
    data: data
  })
}

//删除
export function deleteExamPaper(paperIds){
  return request({
    url: "/api/uf/boostor/exam/question/ExamPaperRest/remove/" + paperIds,
    method: "delete"
  })
}
